package dan.britt.hash;

import java.io.File;
import java.util.Dictionary;

import org.apache.commons.io.*;
import org.w3c.dom.*;

import com.sun.org.apache.bcel.internal.generic.NEW;

public class SystemTest {

	static MyMap<String, String> map;

	public static void main(String args[]) {

		String dictionary = "";
		String[] dictArray;
		int arraySize;

		try {
			dictionary = FileUtils.readFileToString(new File("largeDictionary.txt"));
		} catch (Exception e) {
			System.out.println("FUCKFUCKFUCK");
		}
		dictArray = dictionary.split("\n");
		arraySize = dictArray.length;
		map = new MyMap<String, String>(arraySize);

		//Das Build!
		long start = System.currentTimeMillis();
		for (int i = 0; i < dictArray.length; i++) {
			dictArray[i] = dictArray[i].trim();
			map.put(dictArray[i], dictArray[i]);
			System.out.println(map.get(dictArray[i]));
		}
		System.out.println(System.currentTimeMillis() - start);
	}

}
